<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>Type TObjectTagEvent</TITLE>
<link rel="stylesheet" type="text/css" href="help.css">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
	<PARAM NAME="Keyword" VALUE="Type TObjectTagEvent">
</OBJECT>

<H1><A NAME="type_tobjecttagevent"></A><B>Type TObjectTagEvent</B></H1>
<HR>

<H2 class="Declaration">Declaration</H2>

<P>TObjectTagEvent = procedure(Sender: TObject; Panel: ThvPanel;</P>

<P>const Attributes, Params: TStringList;  var WantPanel: boolean) of Object;</P>

<H2 class="Description">Description</H2>

<P>The TObjectTagEvent type is the type for the <A HREF="onobjecttag_event.htm">OnObjectTag</A> event.  This event occurs when an <B>&lt;object&gt;</B> tag is encountered at document load time.</P>

<P><I>Sender</I>the THtmlViewer displaying the ThvPanel.</P>

<P><I>Panel</I>the ThvPanel (similar to TPanel) created for the display.  Its Name property has been assigned to the <I>NAME</I> attribute value and its Height and Width properties have been assigned the values of the <I>HEIGHT</I> and <I>WIDTH</I> attributes.</P>

<P><I>Attributes</I>a TStringList containing all the attributes found in the <B>&lt;object&gt;</B> tag.  Individual attributes may be accessed using TStringList's Values property, as:</P>

<P>ClassId := Attributes.Values['classid'];</P>

<P><I>Params</I>a TStringList containing the Name and Value attributes of all the <B>&lt;param&gt;</B> tags that immediately follow the <B>&lt;object&gt;</B> tag.</P>

<P><I>WantPanel</I>a boolean which should be set by the user.  Setting <I>WantPanel</I> <B>True</B> indicates the ThvPanel is to be used.  If, for some reason, the program can't make use of the ThvPanel, this parameter should be set to <B>False</B> and the panel will be free'd.</P>

<P><B>Usage Notes:</B></P>

<P>The two TStringLists are free'd by THtmlViewer immediately on return from the event.  Any data needed after the event should be saved in the event handler.</P>

<P>If <I>WantPanel</I> is returned <B>True</B>, then HTML between the <B>&lt;object&gt;</B> and <B>&lt;/object&gt;</B> tags is ignored.  If <I>WantPanel</I> is <B>False</B>, then HTML following the <B>&lt;object&gt;</B> and <B>&lt;param&gt;</B> tags is displayed and acted on.  It is possible to have a second <B>&lt;object&gt;</B> tag here providing a second choice for display.</P>

<P>The <A HREF="onpanelprint_event.htm">OnPanelPrint</A> and <A HREF="onpaneldestroy_event.htm">OnPanelDestroy</A> events will also be initiated by the ThvPanel created for the <B>&lt;object&gt;</B> tag.</P>

<P><B>See also:</B></P>

<P><A HREF="onobjecttag_event.htm">OnObjecTag Event</A></P>

<P><A HREF="special_html_tags_and_attributes.htm#panel_tag">&lt;PANEL&gt; Tag</A></P>

</BODY>
</HTML>
